<!DOCTYPE html>
<html>
<head>
	<title>订单列表</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<meta name="viewport" content="width=device-width,user-scalable=no" />
	<meta http-equiv="content-type" content="text/html;charset=utf-8" />
	<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('public_url');?>/css/common.css">
	<link rel="stylesheet" type="text/css" href="<?php echo $this->config->item('public_url');?>/css/order_lst.css"></head>
<body>
	<!-- <div class="order_lst_tab">
		<ul>
			<li>全部订单</li>
			<li>待付款</li>
			<li>待发货</li>
			<li>待收货</li>
		</ul>
	</div> -->
	<div class="order_list">
		<ul id="order_list">
    			<?php 
    			if (!empty($order_lst)){
    			     foreach ($order_lst as $v):?>
			<li>
				<div class="order_lst_time">
					订单日期：<?php echo date("Y-m-d H:i:s",$v['create_date']+8*60*60);?>
					<?php if ($v['order_status'] == '2'){
					           $status_name = "待付款";
					           $status_button = "立即支付";
					      }else if ($v['order_status'] == '3'){
					           $status_name = "待发货";
					           $status_button = "";
					      }elseif ($v['order_status'] == '4'){
					           $status_name = "待收货";
					           $status_button = "确认收货";
					      }elseif ($v['order_status'] == '5'){
					           $status_name = "已收货";
					           $status_button = "";
					      }elseif ($v['order_status'] == '6'){
					           $status_name = "已取消";
					           $status_button = "";
					      }
					?>
					<span class="order_lst_dai"><?php echo  $status_name;?></span>
					
				</div>
				<a href = "<?= site_url('Npoint_store/Order/order_detail?order_id='.$v['order_id'])?>">
    				<div class="order_proimg">
    					<img src="<?php echo $v['product_thumb_img'];?>" alt=""></div>
    				<div class="order_des">
    					<div class="order_protitle">
    						<div class="order_prot">
    						<?php if ($v['sorce'] == '2' or $v['sorce'] == '4'){?>
    						<p class="choujiang">抽奖</p>
    						 <?php }?>
    						<?php echo $v['product_title'];?></div>
    						<p class="order_protitle_money">
    							<img src="<?php echo $this->config->item('public_url');?>/images/4_19.png" alt=""><?php echo $v['product_need_npoint'];?></p>
    					</div>
    					<div class="order_color">
    						<span><?php echo $v['product_attr_name'];?></span>
    						<p class="order_number">x<?php echo $v['number'];?></p>
    					</div>
    				</div>
    				<div class="order_lst_zongji">共<span><?php echo $v['number'];?></span>件商品 总计：<img src="<?php echo $this->config->item('public_url');?>/images/4_19.png" alt=""><?php echo $v['total_price'];?></div>
    				</a>
    				<?php if ($status_button != ""){?>
    				<div class="order_lst_btn">
    					<div class="order_lst_b confirm_goods" data-c="<?php echo $v['order_id'];?>"><?php echo  $status_button;?></div>
    				</div>
				<?php }?>
			</li>
			  <?php endforeach;}?>
		</ul>

		<div  class="Loading"><?php if (count($order_lst) < 10){?>
		全部加载完！
		<?php }else{?>
		Loading...
		<?php }?>
		</div>
	</div>
	<script type="text/javascript" src="<?php echo $this->config->item('public_url');?>/js/jquery-3.2.1.min.js"></script>
	<script type="text/javascript">
		var url = "<?= site_url('Npoint_store/Order/order_lst')?>";
		var href = "<?= site_url('Npoint_store/Order/order_detail')?>";
		var confirm_goods_url = "<?= site_url('Npoint_store/Order/confirm_goods')?>";
		var img_url = "<?php echo $this->config->item('public_url');?>";
	</script>
	<script type="text/javascript" src="<?php echo $this->config->item('public_url');?>/js/common.js"></script>
	<script type="text/javascript" src="<?php echo $this->config->item('public_url');?>/js/order_lst_new.js"></script>
</body>
</html>